package com.csun.cmny.provider.service;

import com.csun.cmny.provider.model.dto.csunbutton.BedOldmanCsunButtonReqDto;
import com.csun.cmny.provider.model.dto.sleep.BedOldmanSleepReqDto;
import com.csun.cmny.provider.model.dto.watch.OldmanBindWatchReqDto;
import com.csun.cmny.provider.model.vo.*;
import com.csun.cmny.provider.model.vo.csunsleep.DmcCsunSleepVo;
import com.csun.cmny.provider.model.vo.csunsleep.SleepAndAlert;
import com.csun.cmny.provider.vo.RoomSleepInfo;
import com.github.pagehelper.PageInfo;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public interface DmcRpcService {

    //DeviceReqVo getDeviceByid(Long deviceId);

    /**
     * query watch oldman address by oldman id list
     *
     * @param oldmanIds oldman id list
     *
     * @return  the list.
     */
    List<WatchOldmanAddressVo> queryWatchOldmanAddressByOldmanIds(List<Integer> oldmanIds);

    /**
     * query watch oldman bing watch list
     *
     * @param oldmanBindWatchReqDto oldman not bind watch req dto
     *
     * @return  the list.
     */
    List<Integer> queryOldmanBindWatchList(OldmanBindWatchReqDto oldmanBindWatchReqDto);

    /**
     * query body sensor location by room id list
     *
     * @param roomIdList    room id list
     *
     * @return  the list.
     */
    List<BodySensorReqVo> queryBodySensorLocationByRoomIds(List<Integer> roomIdList);

    /**
     * query csun sleep data by bed oldman list
     *
     * @param bedOldmanSleepReqDtoList  bed oldman sleep req dto list
     *
     * @return  the list.
     */
    List<CsunSleepDataReqVo> queryCsunSleepDataByBedOldmanList(List<BedOldmanSleepReqDto> bedOldmanSleepReqDtoList);

    /**
     * query sleep care data by bed oldman list
     *
     * @param bedOldmanSleepReqDtoList  bed oldman sleep req dto list
     *
     * @return  the list.
     */
    List<SleepCareDataReqVo> querySleepCareDataByBedOldmanList(List<BedOldmanSleepReqDto> bedOldmanSleepReqDtoList);

    /**
     * query csun button by bed oldman list
     *
     * @param bedOldmanCsunButtonReqDtoList bed oldman csun button req dto list
     *
     * @return  the list.
     */
    List<CsunButtonReqVo> queryCsunButtonByBedOldmanList(List<BedOldmanCsunButtonReqDto> bedOldmanCsunButtonReqDtoList);

    /**
     * query tfid label by oldman id list
     *
     * @param oldmanIdList  oldman id list
     *
     * @return  the list.
     */
    List<RfidLabelReqVo> queryRfidLabelByOldmanIds(List<Integer> oldmanIdList);

    /**
     * query device alert by device list
     *
     * @param deviceReqVoList
     * @return
     */
    List<DeviceAlertReqVo> queryDeviceAlertByDeviceList(List<DeviceReqVo> deviceReqVoList);

    /**
     * send building floor update msg
     *
     * @param tagList   tag list
     */
    void sendBuildingFloorUpdateMsg(List<String> tagList);

    /**
     * query DeviceAlert By OldIdA nd D ate
     *
     * @param deviceAlertReqVo
     */
    List<DeviceAlertReqVo> queryDeviceAlertByOldIdAndDate(DeviceAlertReqVo deviceAlertReqVo);

    /*
    * query the number of device group by the type of divice
    *
    * @param groupId
    * */
    List<DeviceCountVo> queryDeviceNumByGroupByDeviceType(Long groupId);

    /**
     * 通过老人id解绑老人绑定的设备
     * @param: [oldmanId]
     * @return: java.lang.Integer
     */
    Integer breakBindDeviceByOldmanId(Long oldmanId);

    /*通过房间id查询温度和床垫信息*/
    Map selectDeviceDataByRoomId(Long roomId);

    /*通过房间id查询报警信息*/
    Map selectAlertDataByRoomId(Long roomId,Long groupId);

    /**
     * 查询life房间绑定的摄像头编号
     * @date 2020/1/6 9:44
     * @param roomId
     * @return com.csun.cmny.provider.service.DmcRpcService
     */
    List<String> getCameraDeviceNoByLifeRoomId(Long roomId);

    /*
    * 判断Life老人是否在房
    * */
    IsInRoomVO getIsInRoomStatus(Long roomId);

    /*
    * 根据设备id查询设备编号
    * */
    List<DeviceReqVo> listDevice(List deviceIdList);

    /**
     * 根据房间Id查询温湿度计数据
     *
     * @param roomIdList    the room id list
     *
     * @return  the humidistat req vo list
     */
    List<HumidistatReqVo> queryHumidistatByRoomIds(List<Integer> roomIdList);

    /**
     * 根据房间Id查询摄像头数据
     *
     * @param roomIdList    the room id list
     *
     * @return  the camera req vo list
     */
    List<CameraReqVo> queryCameraByRoomIds(List<Integer> roomIdList);

    /**
     * 根据房间Id查询网关
     *
     * @param roomIdList    the room id list
     *
     * @return  the gateway req vo
     */
    List<GatewayReqVo> queryGatewayByRoomIds(List<Integer> roomIdList);
    //查询床垫数据
    List<Map> querySleepInfoByRoomId(ArrayList<Long> ids);
    //查询床垫报警信息
    PageInfo querySleepAlertInfo(ArrayList<Long> ids, Integer isHandle, Integer pageNum, Integer pageSize);
    //查询床垫状态
    List<com.csun.cmny.provider.vo.SleepDataVo> queryInBed(List<Long> deviceIds);
    //查询绑定了床垫的老人
    List<RoomSleepInfo> querySleepBind(ArrayList<Long> ids);
    //查询床垫时间段是否在床
    List<CsunSleepDataReqVo> querySleepInbed(ArrayList<Long> ids,String time);
    //查询报警信息
    List<DmcDeviceAlert> queryAllSleepAlert(ArrayList<Long> ids);
    //查询床垫绑定
    List<DmcCsunSleepVo> queryGroupCsunSleepList(Long groupId);
    //查询床垫绑定以及老人基本信息
    SleepAndAlert queryGroupCsunSleepListByGroupId(Long groupId);
}
